<template>
  <base-page class="base-form" title="考试详情" @back="onCancel()">
    <view class="main-box">
      <view class="content-box">
        <view class="container">
          <uni-list>
            <uni-list-item
              showExtraIcon="true"
              :extraIcon="{ type: 'staff-filled' }"
              title="考试名称"
              :rightText="stuResult.tpName"
            />
            <uni-list-item
              showExtraIcon="true"
              :extraIcon="{ type: 'person-filled' }"
              title="姓名"
              :rightText="stuResult.name"
            />
            <uni-list-item
              showExtraIcon="true"
              :extraIcon="{ type: 'email-filled' }"
              title="考试用时"
              :rightText="stuResult.timeConsuming + ''"
            />
            <uni-list-item
              showExtraIcon="true"
              :extraIcon="{ type: 'auth-filled' }"
              title="分数"
              :rightText="stuResult.score + ''"
            />
            <uni-list-item
              showExtraIcon="true"
              :extraIcon="{ type: 'auth-filled' }"
              title="交卷时间"
              :rightText="stuResult.examinationTime"
            />
          </uni-list>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
        </view>
      </view>
    </view>
  </base-page>
</template>

<script>
export default {
  data() {
    return { 
      stuResult: {},
    };
  },
  onLoad(option) {
    this.stuResult = JSON.parse(decodeURIComponent(option.stuResult));
    this.stuResult.timeConsuming = this.stuResult.timeConsuming + "秒";
    this.getUser();
  },
  methods: {
    getUser() {},
    onCancel() {
      uni.navigateTo({
        url: `/views/forum/myExam`,
      });
    },
  },
};
</script>

<style lang="scss">
page {
  background-color: #ffffff;
}
</style>